const http = require("http");
const path = require("path");
const ejs = require("ejs");
const url = require("url");
http.createServer(function (req, res) {
    res.writeHead(200, {"Content-Type": "text/html;charset=utf-8"});

    const pathName = url.parse(req.url).pathname;

    if (pathName === "/login") {
        const data="你好";
        const data2=["11",222,3333,444,555,88];
        ejs.renderFile(path.join(__dirname, "view/index.ejs"), {sss:data,ss:data2}, function (err, data) {
            res.end(data)

        })
    }


}).listen(8001);